package com.os.ui;

import javax.swing.JTextArea;
import javax.swing.border.CompoundBorder;
import javax.swing.border.EmptyBorder;
import javax.swing.border.LineBorder;
import java.awt.Color;

public class Custom3DTextArea extends JTextArea {
    public Custom3DTextArea() {
        // 设置背景色
        setBackground(Color.WHITE);

        // 创建内边距和边框
        EmptyBorder emptyBorder = new EmptyBorder(10, 10, 10, 10);
        LineBorder lineBorder = new LineBorder(Color.GRAY, 1);

        // 将内边距和边框组合起来
        CompoundBorder compoundBorder = new CompoundBorder(lineBorder, emptyBorder);

        // 应用内边距和边框
        setBorder(compoundBorder);
    }
}
